main
Sub Main
	dim doc
	Set doc=Application.ActiveDocument
	dim objs,obj
	set objs = doc.getobjects(2,,true)
	dim ostr
	ostr =""
	for each obj in objs
		if ostr<>"" then ostr = ostr & " "
		ostr = ostr & obj.name
	next
	
	dim ws : set ws = CreateObject("WScript.Shell")
	dim varName : varName = "PADS_SHORTCUT_ROOT"
	dim regPath : regPath ="HKEY_CURRENT_USER\Software\MyApp\PADS\" & varName
	dim varValue : varValue = ws.RegRead(regPath)
	
	dim clipfile,scriptfile
	clipfile = varValue & "\cache\clipboard.txt"
	scriptfile = varValue & "\Skill\includes\CopyToClipboard.vbs"

	
	dim fso,fw
	set fso=createobject("scripting.filesystemobject")
	set fw = fso.createtextfile(clipfile)
	fw.write ostr
	fw.close
	set fw=nothing
	set fso = nothing
	
	dim ocmd
	ocmd =  "cscript " & scriptfile & " " & clipfile
	ws.run ocmd,true
	set ws = nothing

	'Clipboard ostr
	msgbox "copy to clipboard"	
End Sub

